package example.abstractTest.guessGame;

class A{
	int num = 1;
	public void show(){
		System.out.println("Function A");
	}
}

class B extends A{
	int num = 2;
	public void show(){
		System.out.println("Function B");
	}
}

public class InstanceOfTest {
	public static void main(String args[]){
		A a1 = new A();
		System.out.println(a1.num);
		a1.show();
		
		A a2 = new B();
		System.out.println(a2.num);
		a2.show();
		
		B b = new B();
		System.out.println(b.num);
		b.show();
	}
}
